import request from '@/utils/request'

/**
 * @description
 * @author Golduck
 * @date 06/05/2025
 * @export
 * @param {number} flowId
 * @param {number} flowStatus
 * @return {*}  {ResponsePageResult}
 */
export function updateFlowStatus(flowId, flowStatus) {
  return request.put('/v1/flow/status', { flowId, flowStatus });
}

/**
 * @description
 * @author Golduck
 * @date 06/05/2025
 * @export
 * @param {{ pageNum: number; pageSize: number; flowName?: string; flowType?: string }} params
 * @return {*}  {ResponsePageResult}
 */
export async function flowPage(params) {
  return request.post('/v1/flow/page', params);
}

export async function deleteFlow(id) {
  return request.delete(`/v1/flow/delete/${id}`);
}
